/* CSS变量系统 - 高吸引力版 */
:root {
  --primary-color: #0f172a;
  --secondary-color: #1e293b;
  --accent-color: #06b6d4;
  --highlight-color: #a855f7;
  --gradient-primary: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
  --gradient-accent: linear-gradient(135deg, #06b6d4 0%, #0891b2 50%, #0e7490 100%);
  --gradient-highlight: linear-gradient(135deg, #a855f7 0%, #ec4899 50%, #f43f5e 100%);
  --gradient-dynamic: linear-gradient(45deg, #06b6d4, #a855f7, #ec4899, #06b6d4);
  --gradient-aurora: conic-gradient(from 180deg at 50% 50%, #06b6d4, #a855f7, #ec4899, #06b6d4);
  --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
}

/* 动态渐变背景 */
html,
body {
  height: 100%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  position: relative;
  overflow: hidden;
}

/* 动态背景装饰 */
body::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: var(--gradient-aurora);
  animation: rotate 20s linear infinite;
  opacity: 0.1;
  z-index: -1;
}

body::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(6, 182, 212, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(168, 85, 247, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(236, 72, 153, 0.05) 0%, transparent 50%);
  animation: pulse-glow 4s ease-in-out infinite alternate;
  z-index: -1;
}

@keyframes rotate {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

@keyframes pulse-glow {
  0% {
    opacity: 0.05;
  }

  100% {
    opacity: 0.15;
  }
}

/* 提示框 - 玻璃态设计 */
.alert {
  width: 400px;
  position: fixed;
  top: 50px;
  left: 50%;
  transform: translateX(-50%);
  display: none;
  border-radius: 16px;
  backdrop-filter: blur(20px);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.2),
    0 8px 16px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  z-index: 1000;
  animation: slide-in-top 0.6s var(--ease-out-expo);
}

@keyframes slide-in-top {
  0% {
    transform: translateX(-50%) translateY(-100px);
    opacity: 0;
  }

  100% {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
}

@media screen and (max-width: 480px) {
  .alert {
    width: 90%;
    top: 30px;
  }
}

.show {
  display: block !important;
  animation: slide-in-top 0.6s var(--ease-out-expo);
}

/* 登录容器 - 玻璃态卡片 */
.login-wrap {
  width: 400px;
  padding: 40px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow:
    0 32px 64px rgba(6, 182, 212, 0.15),
    0 16px 32px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  position: relative;
  overflow: hidden;
  animation: fade-in-scale 0.8s var(--ease-out-back);
}

.login-wrap::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-accent);
  border-radius: 24px 24px 0 0;
}

.login-wrap::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(from 0deg at 50% 50%,
      transparent 0deg,
      rgba(6, 182, 212, 0.03) 60deg,
      rgba(168, 85, 247, 0.03) 120deg,
      rgba(236, 72, 153, 0.03) 180deg,
      transparent 360deg);
  animation: rotate 30s linear infinite;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.login-wrap:hover::after {
  opacity: 1;
}

@keyframes fade-in-scale {
  0% {
    transform: scale(0.8) translateY(30px);
    opacity: 0;
  }

  60% {
    transform: scale(1.05) translateY(-10px);
    opacity: 0.8;
  }

  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

@media screen and (max-width: 480px) {
  .login-wrap {
    width: 90%;
    padding: 30px;
    margin: 0 15px;
    border-radius: 20px;
  }
}

/* 标题样式 */
.login-wrap .title {
  font-size: 32px;
  text-align: center;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
  font-weight: 700;
  position: relative;
  text-transform: uppercase;
  letter-spacing: 2px;
  animation: glow-pulse 2s ease-in-out infinite alternate;
}

@keyframes glow-pulse {
  0% {
    filter: brightness(1);
  }

  100% {
    filter: brightness(1.2);
  }
}

@media screen and (max-width: 480px) {
  .login-wrap .title {
    font-size: 26px;
    letter-spacing: 1px;
  }
}

/* 表单容器 */
.login-wrap .login-form {
  margin-top: 30px;
}

/* 输入框占位符样式 */
input::-webkit-input-placeholder {
  color: #94a3b8 !important;
  font-style: italic;
}

/* 登录按钮 - 高吸引力设计 */
.login-form .btn {
  width: 100%;
  background: var(--gradient-accent);
  border: none;
  padding: 18px 0;
  font-size: 18px;
  font-weight: 700;
  border-radius: 16px;
  transition: all 0.5s var(--ease-out-back);
  box-shadow:
    0 12px 32px rgba(6, 182, 212, 0.4),
    0 6px 16px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #ffffff;
  cursor: pointer;
}

.login-form .btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
      transparent 0%,
      rgba(255, 255, 255, 0.3) 50%,
      transparent 100%);
  transition: left 0.8s ease;
}

.login-form .btn::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  padding: 2px;
  background: linear-gradient(45deg, #06b6d4, #a855f7, #ec4899);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.login-form .btn:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow:
    0 20px 48px rgba(6, 182, 212, 0.5),
    0 10px 24px rgba(0, 0, 0, 0.15);
}

.login-form .btn:hover::before {
  left: 100%;
}

.login-form .btn:hover::after {
  opacity: 1;
}

.login-form .btn:active {
  transform: translateY(-3px) scale(1.01);
  box-shadow:
    0 12px 24px rgba(6, 182, 212, 0.4),
    0 6px 12px rgba(0, 0, 0, 0.1);
}

/* 表单项间距 */
.login-form .item:nth-child(n + 1) {
  margin-top: 24px;
}

/* 输入框 - 高吸引力设计 */
.login-form input {
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px 20px;
  font-size: 16px;
  transition: all 0.4s var(--ease-out-expo);
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: relative;
}

.login-form input::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 12px;
  padding: 2px;
  background: var(--gradient-accent);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.login-form input:focus {
  border-color: var(--accent-color);
  box-shadow:
    0 0 0 6px rgba(6, 182, 212, 0.1),
    0 8px 24px rgba(6, 182, 212, 0.15);
  outline: none;
  transform: translateY(-2px);
}

.login-form input:focus::before {
  opacity: 1;
}

.login-form input:hover {
  border-color: #22d3ee;
  box-shadow:
    0 6px 16px rgba(6, 182, 212, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}